﻿using System.Collections.Generic;

namespace Viettel.VOFFICE.Web.Models
{
    public class DeptModel
    {
        public DeptModel()
        {
            this.SubDepts = new List<DeptModel>();
        }
        public int Id { get; set; }
        public string Name { get; set; }
        public string Description { get; set; }
        public int? ParentId { get; set; }
        public IList<DeptModel> SubDepts { get; private set; }
        public bool IsLeaf
        {
            get
            {
                return this.SubDepts.Count == 0;
            }
        }
    }
    public class UidModel
    {
        public UidModel() { }
        public int DepartmentId { get; set; }
        public string UserName { get; set; }
        public int? PositionId { get; set; }
        public bool IsInDept { get; set; }
    }
}